package com.stylefeng.guns.modular.system.dao;

import com.baomidou.mybatisplus.plugins.Page;
import com.stylefeng.guns.core.datascope.DataScope;
import com.stylefeng.guns.modular.system.model.ManagerGoods;
import com.baomidou.mybatisplus.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author LiuXin
 * @since 2018-09-12
 */
@Repository
public interface ManagerGoodsMapper extends BaseMapper<ManagerGoods> {

    /**
     * 根据数据范围查找分页
     * @param page 分页
     * @param dataScope 数据范围
     * @param managerGoods 查询条件
     * @return 结果集
     */
    List<ManagerGoods> selectPageWithDataScope(@Param(value = "page") Page page, DataScope dataScope, @Param(value = "mg") ManagerGoods managerGoods);

    /**
     * 查找预警信息
     * @param page 分页
     * @param dataScope 数据范围
     * @param managerGoods 条件
     * @return 结果集
     */
    List<ManagerGoods> selectAlarmPage(Page page, DataScope dataScope, @Param("mg")ManagerGoods managerGoods);

}
